package com.clw.repository;

import com.clw.dataobject.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;


/**
 * Created by Administrator on 2017-12-15.
 */
public interface UserRepository extends JpaRepository<User,Integer>{

    User findByUserName(String userName);

    Page<User> findAll(Specification<User> spec, Pageable pageable);

    Long count(Specification<User> spec);

    User findById(Integer id);
}
